import request from '@/utils/request'

export function fetchEmployeeList(params) {
  return request({
    url: '/sys/user',
    method: 'GET',
    params
  })
}

// export const fetchEmployeeList = params => request.get('/sys/user', params)

export function fetchAddEmployee(data) {
  return request({
    url: '/sys/user',
    method: 'POST',
    data
  })
}

// export const fetchAddEmployee = data=> request.post('/sys/user', data)

/**
 * @description: 导入excel
 * @param {*} data
    [{
      	 mobile: 15751786320
      	 timeOfEntry: "2019-03-09T16:00:00.000Z"
     	 username: "测试人员1"
     	 workNumber: 88088,
     	 formOfEmployment: 0,
     	 departmentName: "技术部"
      }
    ]
 * @return {*}
 */
export function fetchImportExcel(data) {
  return request({
    url: '/sys/user/batch',
    method: 'POST',
    data
  })
}

export const fetchAssignRole = (data) => request.put('/sys/user/assignRoles', data)
